Some bugfixes to new collision detection system