bugfixing

some bugfixings