Improve deletion detection