Fixed collision distance check