fix flag form bug with database flag options