Fix multiple issues in handling of real time collaboration