fixed event duplication when importing templates on server startup (issue #1197)