fixed bad call on minmax