Fixed windows 8 crash at window creation