Fixed scriptrepr for random state objects using script_repr_reg