Changed sequence logic.