nodes.first should work fine for the condition, though. Am I missing something?