fixed a couple of problems