Fixes several thngs