Fix bug with no-filetype detection