Miscellaneous minor fixes