DO NOT MERGE fixes for cm-12.0

lots of shit that will get reverted later

Change-Id: I66b40caab0c3378c54cefab1e2a4a06ec34e0d38