Fix redraw issue

Fixes #331