Fix a bug with resource loading from BCS