fixed bug with makeStructure