fix corrupt registry