fix context bug; remove debug lines