Fixed date error for cookies