move application controller load hook to the end of the class definition. find explanation why inside.
Merge pull request #912 from opf/fix/move_application_controller_load_hook2

move application controller load hook to the end of the class definition