Got collision detection working properly