Fix a bug which makes resource loading fail.