Burning element even after shutting oven off

After preheating the top oven, I noticed the element was burning and sparking. I shut the top oven off. I kept the bottom oven on to continue cooking dinner but the melting continued 3/4 of the way down the tube until I (finally) shut the power supply off.

It seems the control panel is not communicating with the element to shut off when the oven is turned off.

Has this happened to anyone else? Should I replace the control panel first before the element and if so, how do I do that? Thanks!