Fix error with multiple resources