Fix various compiler warning