Fix some assigned but unused variable warnings