Update publish method.