Fix several deprecated-variable-access warnings