rebase from cm-10.1 branch to pick up missing commits