some fixes & join data structures