Fixed OS X implementation