fixed issues on json data output