fix json bug on return (data was an array of array)