half-assed fix for linux and osx