fix measureActivity crash