fix argument names and store bufferUsed size (this fixes the json parsing bug);
fix list parsing;