Fix to automatic publishing