torch header fixes