Misc fixes and whatnot