fixing registry serializing issue