fixed scaling bug in HDF5 implementation