fixed bugs in watcher