getApplication fix in controller