fix setting of context