Fixed sprite rendering in case of only part of the sprite is visible on the screen.