fixing a global memory leak detection error detected with jshint