more headless fixes

Change-Id: I25243f67b8bcbef41867497b442d1b7f38f638dd
Merge remote-tracking branch 'cm/cm-10.1' into cm-10.1