Fix context initialization