Various fixes to the collision system.