fix context bug