Wireless Sensor Network (WSN) having a small sensor suffers from limited computational and communication power. These sensors are deployed randomly and sparsely in the network. One of the major problems occurring in such environment at the time of deployment is the formation of holes in the network. The hole is a communication gap, which affects the general performance of the network. An improved solution is proposed called Modified Hole Detection and Healing (MHDH) algorithm. MHDH algorithm operates in two phases. In the first phase algorithm find out holes in the network and in the second phase of algorithm the hole healing method is applied. This algorithm used for both randomly and on-demand hole healing. On-demand hole healing is needed because the demand of sensing the complete area is very rare hence it is better to heal the hole in an area where sensing demand is high.