check for zero selected parts and fixed a typo