fix JSON serialization