fix bug when deleting some instances from web ui