fix conditions for adding stanzas