fixed bad tests, and also poorly constructed query, as a result of fixing the test