validation for Contacts and some bugs