Fixes in data sharing attributes processing in templates