[fix] copy head buffer into correct var name

There is no upgrade variable so I assume this is what you meant