Fixed cookie writing, should now write correctly

I was simply writing the wrong variable, it should now write only the
numbers to the cookie.