fix bug: extract_max