fixed error when deleting entries