fixed sprite rotation along with wrong bound checking