fix decorating in mapping and template