Fix bug in watcher