Fixed possible hang in collision routines.