possible fix custom publish

plus some code format bitching