Fix nodetool infinite loop issue