fix bug when setting the tempdata cookie
formatting