Fix bug when running from Flash builder