fix bug of mac