Do not corrupt HEAD when error.
Fix bugs in HEAD rendering.
Do not try to render HEAD again and fix bug with afterMethod.
Fix wrong event name.