Fix bug when serializing generated assets