fix duck typing in case file_number is zero