fixed bug with json encoding