Fix isjoined function