Fixed use of random() bits