MacOS compilation problems solved