fix a crash on Linux