Did they give you all the opportunities to improve your work though? Sufficient training - either a course or in-house? Did you discuss your progress with your line manager on a regular basis? You should have been given every chance to improve