better text changes handling