A dialysis machine comprising a fluid circuit for providing a dialysis fluid to a dialyser is disclosed. The fluid circuit comprises a tube with a first valve for providing a disinfectant fluid for disinfecting at least a part of the fluid circuit at disinfection of the dialysis machine. The tube with the first valve is arranged to provide the disinfectant fluid upstream the dialyser and at a position in the fluid circuit where pressure is, during treatment, such that a pressure gradient between ports of the first valve is provided, the ports comprising at least a disinfectant fluid port and a fluid circuit port, such that the disinfectant fluid port of the first valve is enabled to be safely connected to a source of disinfectant also during treatment. A method of controlling such a dialysis machine and a computer program for controlling are also disclosed.