Fix Osx errors.