fixes a bunch of bugs
fixes up something