some fixes in context creation