fix arrays serialization