Fix tag mode tagging wrong images.