fix OS X compatible problem, issue #13