Fixed a bug (saving array to DB)