Fixed segmentation fault on startup (windows only)