fix some problems

avoid throwing some errors in IE, some change the the js file can put on
head