I'm not an expert in this but it does make sense. Remake the code for whatever is making things bugged from scratch. You might end up fixing more bugs than what you're trying to do now. Because what seems to be happening is that, the more you mess with it, the more it breaks.

