fix collision check bug