Fix and error to avoid the file slice divided by zero.