Fixed serialization bug