Fix text doubling on edit