fixed toJson