changing reg_get_key_ function fixes calc crash