fixed a few bugs ioc container
added more assertions to container