Resolved constructor bug in IoC