Fixed context bug thanks to Herman's input.