Bug fixed if struct is an object offset was not set properly