fix error on context pass to print function