This line produces the restart of the widget, but I saw that it's placed on the wrong line. It has to be on  line 253 to prevent a race condition with the listener placed on the line 245.