am 74a9fd08: am a07d37b7: Cherry-pick bug fixes from master.

Merge commit '74a9fd08731f78516a6c0e81169c8e8ff7a6d9c1' into gingerbread-plus-aosp

* commit '74a9fd08731f78516a6c0e81169c8e8ff7a6d9c1':
  Cherry-pick bug fixes from master.