Problem with multible Templates in group

i have the following error.
i use a Template for a Button. (so i can use other Icons etc.)
The template looks like:

<button class="single" ng-click="send(msg)" type="button"><span class="{{msg.icon}} {{msg.state}}"></span></button>

i inject msg.payload etc via an function node.

the Problem is:
when i use this template multible times in one Group node red restarts.
in the log file is see the following errors:

16 Jul 12:31:01 - [red] Uncaught Exception:
16 Jul 12:31:01 - TypeError: Cannot set property 'socketid' of undefined
at Object.beforeSend (/home/pi/.node-red/node_modules/node-red-dashboard/nodes/ui_template.js:79:33)
at EventEmitter.handler (/home/pi/.node-red/node_modules/node-red-dashboard/ui.js:274:26)
at emitOne (events.js:121:20)
at EventEmitter.emit (events.js:211:7)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at /home/pi/.node-red/node_modules/
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickDomainCallback (internal/process/next_tick.js:219:9)
nodered.service: main process exited, code=exited, status=1/FAILURE
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool...
Starting Node-RED graphical event wiring tool...
Started Node-RED graphical event wiring tool.
16 Jul 12:31:04 - [info]

anyone has an idea ?
Thank you very much

Post the output you get when you start node red from the terminal. That will show us what versions of node-red, node etc you are using. Do whatever you do to cause the crash so that is included also.