fix #6400
Merge pull request #6483 from rened/osxfix

fix #6400