fix an error in Mac
Add for Mac