fixing delete endpoint