Fix metadata of current entity was hardcoded to idp
Merge branch 'metadatafix'