Fixes to the contact system