bug fix: vertical lines caused division by zero