Bugfix on serializing an array of resources