fixed a bunch of minor issues