Fixes segfault on Linux