Fixed a bug (shadowed local variable).