Fix bug that gave incorrect file extensions.