added json out fixing bug