Fix context creation and making it current