Fixed bug: Moved resource-url variable inside loop