fixed a bug:when result is null, has a bug ,for can exit. change next to continue.