Your oven could be too hot, or you may have used granulated sugar instead of powdered sugar inside the dough. Both of these can cause them to go flat.