fixed a bunch of minor errors