Fixed problems with dependency injections