Fix inotify code