fixed bugs in various tests