fixed a bunch of smaller problems