fixed heap-use-after-free in solidgen