fixed a bug with min_Ethr so it now selects the correct minima