Miscellaneous fixes.