Fixed slight bug in cookie counter