Fix resources serialization