fix bad js