minor changes from cm upstream