ref #12 fix some mac issues