Variable shadowing fixed.