fixed a lot of small issues