Random fixes

A couple of commits I've carried around for a while.  I think they make sense.