add for activity life cycle.