fixed filetype auto-detection on fetch