agent: Fixing issue with multiple watches. Fixes #337