Fixed bugs relating to IoC container setup.