Error in call back for watcher, method is not a function