Fixed bug in animation sprite flipping