Made some tests more general, less fragile