fix a bug when finding appropriate id and there is no app activity command