removing weird double javascript