Fixed saving of selected unit.