division by zero fix in text image widget. Fixes #288