more headless fixes

Change-Id: I25243f67b8bcbef41867497b442d1b7f38f638dd
Merge branch 'cm-10.1' into martincz