Fix expansion and restriction.