Fixed up a couple problems when using ioc