AppController: Get rid of cast warnings