Fixed bug with hunging then H_MAX equals H_MIN