fix bugs loading js