fixed flash bugs