Fixed bug with eraser when double buffering is enabled