Make sure that cold water supply is connected to the "cold" inlet and the hot water pipe comes from the "hot" outlet. If you cross the connections you could have the problem you describe.
: I've noticed that the cold inlet pipe going into my gas water heater is very hot. What would cause this? Also the kitchen tape cold has warm water coming out when I first open it and takes about 30 seconds before it starts running cold. It is the closest fixture to the heater, by the way. Any ideas. Please help!!!!