added support for multiple templates in one archive. fixed dpkg configuring error