Fix variable shadowing