Improve CreateContext call. Fixed test