cleanup and fix npmPublish check