fixed json-parsing