The butter should be chilled and the cookie also chilled before baking. This keeps the cookie firm and stops it from spreading.