bugfixes
added test