Fixed _get_activity_name method