fixed exceptions under windows when initializing game