Fixes for unit tests and autofac specifics