fixes to AppController for code review