Fixed bug when writing empty data to HDF5