fix some filetype detection