[MacOSX] Fix for bugs #1258081 and #1267772