Fixed issue with empty resource.