Merge "Fix another set of bugs." am: af6a262020 am: df04d3bc93
am: f49aa1323f

Change-Id: I68d58557f41792680a17bb50e07b71445fa9ba84