Changed RANDOM macro to avoid setting most significant bit randomly