fix watcher crash after error