The problem is that you used too much butter or condensed milk or not enough cornstarch. It is also good to chill the cookies for 30 minutes before baking; this optional step prevents them from spreading out.