Fixed possible segfault on exit with VC++