Test if contact exists. Fix #304