lots of bugfixes for everything