Some Flash specific fixes.

(cherry picked from commit 1b3e09b52d97595b160fc9d8a3763c416e3a3361)