Fix line/set divide by zero error