made tests more robust