Fixed variable shadowing warnings.