fixing sprites and collision detection