fixed a bunch of mistakes