fixes test so that it doesn't break from order

One of the tests would break if the order was a certain way. This fixes the test to always work.