Use resource name instead of constructor name.