fixes some test logic