improved bot joining/leaving