Fix bug that broke some file extension checks