Minor changes to routine for converting to/from COO format