fixed longstanding bug in tests