Changed the hasFlash to use flashbag