Fixed a bug with #REGISTER_TEMPLATE_REACTION_CLASS