[WIP] osx fixes