fixed solving of templates in resolve template hook and in workfile-mik