FIX Memory access after free
FIX struct definition