Fixed bug when checking for time and cookie values