Fix multiple resources with the same format

Fixes #65.