Context ref fix