Fix more pass-by-reference errors