Modify flags UI to avoid collision with filenames