Fix various compiler warnings