Fixed bug where sprites could become misaligned