fix a lot of stuff