Adding checks and repair logic for invalid gear sizes in domains