Fix bug with watcher
Fix bug in debug mode