Fix mac OS issues