Tweaked api.delete