Fixing an issue with expunge logic