why do we need publishOnlyWhenOnMaster twice?