Fix bug in computing total_size if no data from current file