fix JS scripts