fix collision functions