fixed matin to work with OS X