Bugfixing and little changes