fixed invalid context 0x0 runtime errors