Flash algorithm tweaks.