Only allow as many units to be selected as are available - fixes #43.