remainder of fixes from last merge

Oops, forgot to save these files before commit