Fix for windows
Fix for windows
Work out when to create the context on windows