Context creation fixes