fixed templates bug in websockets