Fix JSON serialization issue