improvements when genrating nml2 for complex cells