fixed the bug that made serial joining and leaving not work