JS remove double update