fix bug, remove the compile warnings