Fixing the sprite animation