fixes to make it fly on linux and macOS