Fix application controller bug