fix contact bugs