aaand more fixes for MacOS