Fix flash header size check and GDS brute check