fixed bug regarding file extensions