More fixes for #1584

Remove extra delimiter character and reduce memory usage