fixing logic in test runner