fixes divide by zero when no columns number is set