a lot of bugfixing...