fixed and improve flash hash