fix filetype detection