Fixed bugs in new_contact_post_poll and added new_contact_pre_poll