Hiya Jessey.

Combination recognition?
Seems like I've been down this road before.

Well, ... I'm not going to try to fix what you have.
I'd suggest highlighting the entire area, and press Delete.
Much easier ways to go about it.

Although the text of this post only partially applies to your case,
I think the code example is more like what you want.
https://www.picbasic.co.uk/forum/showthread.php?p=32566

There are several other examples in that thread too.

HTH,