fix purge bug