add a check in joinActivities