fixed a bunch of obvious mistakes