Misc fixes

Some stuff I never got around fixing