Use the right variable.
I don't like this, but it seems the best way to keep $rc in scope.