fix an npe in the pub builder
Merge pull request #1628 from devoncarew/devoncarew_pub_fix

fix an npe in the pub builder