spec fixes, bug fix in script