fix bug at OS X