Fixes from review (thanks @peterp)