Fixes for r_num_to_bits()