fixed issue in sparql template in dealing with regions