nasty error in json to string conversion fixed