Fixed an error when adding a new contact.