fix custom context calling error