You may have added too much of liquid to your icing sugar. To fix it, just keep adding sugar until you get that nice and thick yet pourable consistency. And if it ends up too thick, add a tiny bit more milk until the consistency is right. Test the glaze on one cookie to see how it sets.