fixing the delete function for hash_chain