fix registry error