Fix a warning about a set but unused variable by actually using it