fix collision detection problem