Fixing logic for displaying services dynamically, also in template