Fix some bugs

- error on 10s capture timeout
- error on executeScript in a removed tab
- avoid double clicks on end gracefully