fix crash on string instead of struct