context constructor injection bug fix