Fix JS for editing tags