move dead node test inside loop, and update silly comment