Fixed JSON serialization issues