Fixes to the pub script.