Make a few tests more robust