Applied a fix to the handleJoin method