MSINM-159: Fix minor issues in template execution