fixes to sharejs implementation for when master node quits and restarts