Fix.build

Fix some build errors on mac