Use upvalues in registrations