fixes sending sizeof pointer instead of sizeof struct