modify double free, change variable order in struct