bulletproofing array of formats

Fixes #1143, adds some other other bulletproofing.