Fix various build warnings