make group_join() safer