fixed a bug, caused by moving some dependency logic out of application controller before