Fixes purge-all bug