misc. fixes

No need to merge now–I'll just collect minor fixes here.