Registry crash fix