Fixed a problem with adding a new template using edit template screen.