fix generation for pkg
link to source on github