fix cal context issues