fixing a js file leak