Fix various tests

I've seen the discussion about this; it's horrible. Surely we should be able to guarantee deterministic behaviour?!