Fix onBeforeRender in templates