fix update context bug