purging registry values correctly