variables correction
Registering rules with respect to context.