fix stdin randomization