We may need to try updating the value several times until it is reflected correctly, especially when closing with Ctrl-Enter.