Fixing bugs of "Stop" button's event handler