Fixes resources loading when resources are absent

Fixes #4334