Fixes to get this running.

These are the same as some other changes in a currently unmerged PR.