fix 500 when adding task to template