Fixes for dependency injection.