Fixed filetype auto-detection on fetch