Fix handling of deleting expired hash (Related pull request is #126)