The maze procedure is most commonly done at the same time as open heart or a valve replacement surgery. Surgeons will perform a maze procedure if the patient has a history of an irregular heartbeat that cannot be controlled by other treatments. The maze procedure is used when the electrical system of the heart is not working correctly, which causes the irregular heartbeat. A healthy heart beats between 60 and 80 times a minute, while irregular heart beats can beat 300 or more times a minute, which can increase the risk of a stroke. The surgeon will do a maze procedure only if he is replacing a valve or performing bypass surgery. The maze procedure corrects the irregular heart beat by fixing the electrical system in your heart. Specialized equipment and instruments are used for this type of procedure.