Fixing bug in updateContext