added potential fix for recursive deletion