fix up error handling

Change-Id: I0b9abaac8b189f52ef4fb6ba56ef72f0ff1e4599