fix the min area and max area value issue