Fix flash undefined