Remove a useless line and prevent divide by zero