delete contact functionality; fix runtime error