Fixed a bug that led to a fatal error when deleting entries