fix test so it doesn't fail randomly