fix some edge cases on eraser