addContact function bugs fixed