fixes for the macos build