Fix watching directory bug