Fix various minor issues