Fix ZeroDivisionError in sparktext rendering