Tidied up the qid test.