bug with set value in templates fixed