corrected the bug of missing nodes