FIX: displayErrors is undefined in flags.js controller