Fixes compiler warnings

Fixes compiler warnings due to shadowing a member variable.