several bugfixes..