Added header fetch as well as fixed issue with variables vector