More miscellaneous fixes