Fixed bug with `attach` bh template

Resolved #608