make node checking more robust