added a check for activated Headway to avoid errors