fixed the embedded js problem