fix bug for osx