Fixed dumpgen to work and not recursivly crash