Don't call the IoC when it is not needed.