Added check to make sure that the publisher parameter has been set