Miscellaneous fixes, too many and too small to seperate.