Fix deprecation warning
Fix warning about unused local variable in release builds