Client locking during publishing

+ minor fix