fix problems with stucts in matlab