Fix for, shadowing member variables

Member variables are shadowed by the function parameters. This can cause warnings/errors through compilation.