Fix incompatible with old image without flags

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>