Converted all setflash to flashbag.