Flash detection tweaks