Fixed serialization issues by creating a structured fallback