Prevent segfault on OSX (nw)