Fixed searchForApp to unblock some eme test cases.