Fixed bug with lastError in response to delete