Added check to handleCollision for player