Some fixes for libuv-based watcher

Ref #1052