Fixes: #2061 uid generator and uid in template