fix several compile warnings