fixed double json encoding