Fixed a minor bug with Mac build