small JSON parsing fixes