Context bug fix