Fix failing ret[name] in serialize