Fixes compiler warnings

Fixes compiler warnings due to shadowing member variables.