Fix for filtering during cleanup.