fixed a bug with the temporary collision detection