fixed a few initial bugs