Minor optimization fixes to collision checker