Fixed variable shadowing error