fixed some contact bugs