fix some issues with animations and tile rendering