fix tests failing from time to time