Fixed loading of missing resources.

Fixes #305.