Minor bugs in tests