Fixed serialization issues