Fix various breakages