fix typo
newton: break the loop if there is no item in the priority queue