fix unneeded variable warning in release build