fixed BUG for OSX