Fixed error when re-adding deleted contact
Fixed possible deadlock
Merge branch 'dev'