oops, a couple of fixes to the new code for #316