Merge "Fix exception on rotation." into cm-10.1