...the second case I had in one day of just plain bad programming.

Yesterday was not a good day of coding for me :)