Dishwasher heating element wont shut off

My dishwasher heating element stays on even when the dishwasher is off. I have to keep the door open. Is it the thermostat, heating element or the mother board. Thanks