Fix error in resource loading from JSON.