Fix issue when recursive = false