fix inotify code