fix logic in test: