Issue/664

Fixes NPE when publishing.