Eraser bug

Sometimes when I try to erase something other parts of my drawing become black. Please fix its really annoying