Could you show us your proposed synthesis? You might be getting an unwanted side reaction somewhere.
For instance, if you do a Gabriel synthesis with a 1,2-dihaloethane as one of your steps, you may end up with a 1,2-diphthalimide derivative that won't allow any alkylation reactions (recommend using an excess of 1,2-dihaloethane if you want to avoid this product). Or if you're trying to deprotonate the phthalimide with a nucleophilic base (like NaOH) but 1,2-dihaloethane is also in the same flask, then you'd have a 1,2-diol with poor leaving groups.
Also for your final product, I just realized that the tertiary nitrogen in the center may still react with a halogenated carbon from a neighboring molecule, forming a dimer. If it's okay for the nitrogen in the center to be quarternary, then you might want to put a protecting group on there so your final product can't react with itself.