fix BH templates in attach and button

Close #684