fix java script problem