They are both correct. The second one is probably better because it indicates that there was a period of time that your work wasn't correct. The first indicates ony one instance.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.