Fixed bugs in Contact