bugfix when injecting apps into controllers