Fixes a bunch of broken shit.