fixed a few problems