Bugfix/handle mark as pending delete