fixed a lot of bugz