Misc bug fixes + merge cm-10.2 changes