fixed missing JSON.parse/stringify calls