Minor optimisation to collision detection