fix static struct generation (hopefully it completely works now ...)