fix dj 1.5 bug in templates