Fixes deleting so it works properly