bugfix for complex generator
tweeked setup