fix the MG check for empiricalhist