check if data is array, if not convert it back to array before save (fixed problem with csv import)