bunch of fixes
bunch of fixes2