Added 'beforeRender' method.