Fix unreferenced local variable warning