fixes to spec generation