Fix bug that causes file type detection to fail on ubuntu.