Fix arrays not exporting if one or more references or pointers are null