Date and cookie manipulation fixed