Fix function jsonize that tried to return a string