I think you want to thread the tail through the OTHER side of the "live stitches" -- that way it closes the circle of the top of your hat.
I'm always nervous about that kind of stuff though -- if that pice of yarn breaks sometime later -- than *pooF* the hat comes undone. I don't know if that's a normal fear... but hey... that's me. I'd probably cut an extra piece of yarn and feed that through too "just in case"
So your hat kinda looks like this, with the tail coming out one end -- I'd start threading through the side where I put the XX's
XX 0000000--------------- (tail)