move application controller load hook to the end of the class definition. find explanation why inside.