Bug fix for sendToAll