fixed flash exit problem