Fixed bug in cool function!