fix template error in javascript for comments dialog (fixes #170)