fix watcher and setup function tests