Fixed bug that generated twice the number of frames  from a sprite sheet.