FIX: properly serialize array