Fix a few bugs introduced in recent changes

Change-Id: Ic939cc65208c4e3eb90f547ffac09ce40924641e
3 files changed