fix to delete conflict issue
fixes to the algorithm. cursor preservation now working correctly.