Misc fixes to stuff