Fix flash type not compared with a string