Fixed to save object containing two arrays instead of two separate arrays