well i've read that guys will try to initiate touch when he likes a girl... sooo it is possible that he hugged you because it was like the perfect opportunity to hug and thank you (without you knowing it being more). (touch yes!!!)
ah if he held onto you longer... perhaps it'll be too obvious and maybe he doesn't want that!
It's just the first time you guys hugged, so maybe there will be more opportunities for you guys to hug again in the near future! :) Also, guys are sometimes slow... so when he let go of the hug, and you were still hugging him... maybe he didn't know what to do because he didn't expect you to hug him back.... maybe maybe.
pls keep us updated!! :)