Assorted minor fixes