fix: serialization bug

gson will fail to serialise inner class.