modify for Mac platform add fix bug