Some minor tweaks to get the tests passing again

This needs fixing more completely in the future to use the correct
API, but it gets most of the tests passing for now.

Change-Id: Ide01bccba330e1196c5d060e6f048743f86cbc96