Added missing attachment count saving on update.