Fixed authority loosing encoding in case of registry based