Fix a bunch of mistakes