If you have hot water in the wrong place your system most likely has crossover conditions. To diagnose the actual valves that are causing the problems; perform the following steps:
If there is a crossover problem at that specific valve, water will flow through the valve when hot water is turned on even though you have shut off the hot water to the building.