compiler warning fix
beck to memory leak because of crash on Ubuntu