deleteProcessInstancesIfExists not working

Hi I am using camunda 7.13 community version.
I have defined a process, having multi instance task in a subprocess.
But when i use the “deleteProcessInstancesIfExists” method to delete the running instance of a process, all the entries in “ACT_RU_INCIDENT” are delete for that instance and also end time got updated to all the acitivities in table “ACT_HI_ACTINST”.
But ACT_HI_PROCINST not updating , due to this the instance remains in active sttate.
Can some one please help