Shadow variables

fixed to warnings about shadowing local variables. Sorry my previous patch got rolled into this pull request.