fix issue #23 in Mac OSX and Unix system.