fix bug in context