Feature #2746: Fix bug in update template