fixed a bug when the last trace was not added