complex struct bug