Fix various small issues