top-n purge fix