Fix use global spec logic.