A lot of bugfixing!