Fixed JSON serialization