A method of operating a washing machine (20) and a washing machine (20) comprising a first water tub (301) to contain water therein; a first heater (701) to heat water contained in the first water tub (301); a second water tub (302) to contain water therein and a second heater (702) to heat water contained in the second water tub (302); whereby the washing machine comprises a control unit (250) configured to prevent the first heater (701) and the second heater (702) from being powered together, such as to prevent damage of the electrical components due to an overload upon receiving a water heating command to be performed in both the washing tubs (301, 302) simultaneously.