Fix: wrong variable detection