Fixed issue with resource references