Miscellaneous consistency fixes.