Fix assigned but unused variable warning