fix rest api delete bug