[ANV] quick fix for possible bug -- code gives negative energies for hist going down to zero