fix ExternalInterface bugs