A minor hack to generate headers
Merge changes to 3.0.5