Generate correct random value on 32bits