tests bugfixing