Fixed logic bug in priority queue and altered qtest to show that the items are printed in the correct priority