Commit from MAC by xinyun.