Fixed error when re-adding deleted contact
Fixed possible deadlock