added back nodelength check