Fix before_render after change to hooks-0.4.0. Related to #1278.