bug fix by template