Fix various warnings