move update_in_progress to before template_registry.update