bug in to_hdf