fix bugs when cancating js and uglifying js