fixed segfault but now byte() never generates random numbers or it just breaks