fix bugs of extract_min, add more tests