Fixes template auto-assign issue.