Fix for deletion bug
Fixes deletion bug for first try as well.