fixed template bug in backend