fix file type detect