fixed Matin to work with osx