fixed build on MacOS