Fixed error with scope.watch