fix bug of api return deleted records