Emergency fix (one fatal, one warning)

Resolve inability to edit by moving if/else back inside loop when it hard
got pushed outside of that loop.

Also, resolve one warning about array member being defined.