fixed a bunch of variables