fix js text switch