Dealt with issue #51
Fixed problem with marshalling arrays of different dimension count