Fix most compile warnings