fixing purge flags