Modified the method of named injection.