Fix raising exeption in reg_num_to_int_code. Now it returns nil.