Fixed bug with wrong value type in select

Properly serialize values for select using JSON.stringify and JSON.parse for storing in DOM.