fix bug, in main algo. can not pass test.