Fix the case when no activity was created.