use a random long instead of a random int to reduce intermittent failures
fix #703