MacOS fixes