Fixed the checkCollisions methods