trying to fix collision detection