Bugfix: Fix incorrect repaint when using pencil tool