add a test for contact fields, fix bugs found in testing