Fixed some warnings when building with -Wshadow.