Fixed handling of script_repr=None