Oh, I see what you mean now. That happened to me the last 3 times I tried to set a quarry in the nether. I would leave the quarry working and upon returning I'd see the main tool retracted after a few layers and a pool of lava.
My solutions are:
Babysit the operation and cover any lava source found
Accept my destiny and relocate the quarry hopping that the next location is going to be lava-free