Fix NPE when sending publish responses.