template creation now completes correctly