fix lots of stuff