The `extra` variable that is stored for not creating extra closing characters for strings or brackets is not getting reset when you move the cursor