bugfixing and minor updates