Fix for NullReferenceException on package publish #406