This is most likely to happen from over-baking your cookies. Make sure to take them out of the oven when they're still a bit soft in the middles, that way they can finish cooking on their cookie sheets outside the oven.