[MAGEMEP-165] Fixing serialize and unserialize for settings