fixed a bunch of small problems'