fixed a purge bug